<section class="content-header">
  <h1>
        商标业务
    </h1>
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a ui-sref="trademark">商标业务</a></li>
    <li class="active" ng-bind="current_bread"></li>
  </ol>
</section>
<section class="content">
  <form class="form-horizontal" id="trademark_form">
    <div class="detail-view-header-wrapper">
      <div class="box-footer detail-view-header" ui-scrollpoint ui-scrollpoint-enabled="true" ui-scrollpoint-class="fixed">
        <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
        <button type="button" class="btn btn-info" ng-click="save()">保存</button>
      </div>
    </div>
    <!-- <div class="box box-danger" ng-if="action=='add'">
      <div class="box-header with-border">
        <h3 class="box-title">旧数据迁移</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">是否为旧订单<span class="required">*</span></label>
          <div class="col-sm-8">
            <select class="form-control select2" name="is_old" ng-model="data.is_old" data-rule="required;">
              <option value="">请选择</option>
              <option value="1">旧数据迁移</option>
              <option value="0">新订单</option>
            </select>
          </div>
        </div>
        <div ng-if="data.is_old == 1">
          <div class="form-group">
            <label class="col-sm-2 control-label">订单完成日期</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_finish" name="date_finish" ng-model="data.date_finish">
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="data.is_old == 1">
          <label class="col-sm-2 control-label">本年度是否已年检<span class="required">*</span></label>
          <div class="col-sm-8">
            <select class="form-control select2" name="is_already_annual" ng-model="data.is_already_annual" data-rule="required;">
              <option value="">请选择</option>
              <option value="1">已年检</option>
              <option value="0">未年检</option>
            </select>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">字段说明</label>
          <div class="col-sm-8">
            <p style="line-height: 34px;">
              <span style="color: #217f50; font-weight: bold;">是否为旧订单:</span> 旧的订单数据迁移到该系统时，请选择“旧数据迁移”，旧数据迁移不走审核数据。录入完成后即属于完成的订单
            </p>
          </div>
        </div>
      </div>
    </div> -->
    <div class="box box-danger">
      <div class="box-header with-border">
        <h3 class="box-title">客户基本信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">客户名称<span class="required">*</span></label>
          <div class="col-sm-8">
            <select ui-select2 class="form-control select2" id="customerSelect2" name="customer_id" ng-view="customer_name" ng-model="data.customer_id" data-formatfields="code,text" data-formatcaptions="编号,名称" data-rule="required;" url="Customer/SearchForDropdown" paging="true" style="width: 100%;"></select>
            <span id="customerSelect2-validator" class="select-validator"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">行业类别</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.industry" disabled>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">详细地址</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.province" style="width:18%" disabled>

            <input type="text" class="form-control" ng-model="data.city" style="width:18%" disabled>

            <input type="text" class="form-control" ng-model="data.county" style="width: 18%;" disabled>

            <input style="width:44%" type="text" class="form-control" placeholder="详细地址" ng-model="data.customer_address" data-rule="length[~200];" disabled>
          </div>
        </div>

        <!-- <div class="form-group">
          <label class="col-sm-2 control-label">所属省</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.province" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">所属市</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.city" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">所属县</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.county" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">地址</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.customer_address" disabled>
          </div>
        </div> -->
        <div class="form-group">
          <label class="col-sm-2 control-label">联系人</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.contact" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">手机</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.mobile" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">座机</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" ng-model="data.tel" disabled>
          </div>
        </div>
      </div>
    </div>

    <div class="nav-tabs-custom">
      <ul class="nav nav-tabs">
        <li ng-class="{'active': activeTab == 0}"><a data-toggle="tab"  ng-click="onTab(0)">注册信息</a></li>
        <li ng-class="{'active': activeTab == 1}"><a data-toggle="tab" ng-click="onTab(1)">其他信息</a></li>
        <li ng-class="{'active': activeTab == 2}"><a data-toggle="tab" ng-click="onTab(2)" ng-if="data.is_old == 1 || data.is_annual == 1">注册进度</a></li>
      </ul>
      <div class="tab-content">
        <!-- 注册信息 -->
        <div class="tab-pane" ng-class="{'active': activeTab == 0}">
          <div class="form-group">
            <label class="col-sm-2 control-label">订单类别<span class="required">*</span></label>
            <div class="col-sm-8">
              <select class="form-control select2" name="type" ng-model="data.type" data-rule="required;">
                <option value="">请选择</option>
                <option value="境内">境内</option>
                <option value="境外">境外</option>
              </select>
            </div>
          </div>
          <div class="form-group" ng-if="data.is_old != 1">
            <label class="col-sm-2 control-label">档案号<span class="required">*</span></label>
            <div class="col-sm-8">
              <input type="text" class="form-control" ng-model="data.code" placeholder="系统自动生成" readonly>
            </div>
          </div>
          <div class="form-group" ng-if="data.is_old == 1">
            <label class="col-sm-2 control-label">档案号<span class="required">*</span></label>
            <div class="col-sm-8">
              <input type="text" class="form-control" ng-model="data.code" name="code" data-rule="required; code;" placeholder="区域代码+订单代码+流水号">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">商标名称<span class="required">*</span></label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="name" ng-model="data.name" data-rule="required; length[~100];">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">申请人</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="applicant" ng-model="data.applicant" data-rule="length[~50];">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">申请人地址</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="address" ng-model="data.address" data-rule="length[~300];">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">商标类别</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="trademark_type" ng-model="data.trademark_type" data-rule="length[~300];">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">商标注册地区</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" name="region" ng-model="data.region" url=" Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="注册地区" data-rule=""></select>
              <span id="regionSelect2-validator" class="select-validator"></span>
            </div>
            <div class="col-sm-2 add-dictionary">
              <a class="fa fa-plus" ui-sref=".dictionary({group: '注册地区'})" ui-sref-opts="{location:false}" title="新增注册地区"></a>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">注册方式</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" name="reg_mode" ng-model="data.reg_mode" url=" Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="商标注册方式" data-rule=""></select>
              <span id="regModeSelect2-validator" class="select-validator"></span>
            </div>
            <div class="col-sm-2 add-dictionary">
              <a class="fa fa-plus" ui-sref=".dictionary({group: '商标注册方式'})" ui-sref-opts="{location:false}" title="新增商标注册方式"></a>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">成交日期</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_transaction" name="date_transaction" ng-model="data.date_transaction" data-rule="">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">成交金额</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="amount_transaction" ng-model="data.amount_transaction" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">交易币别</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="currencySelect2" name="currency" ng-model="data.currency" url=" Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="币别" data-rule=""></select>
              <span id="currencySelect2-validator" class="select-validator"></span>
            </div>
            <div class="col-sm-2 add-dictionary">
              <a class="fa fa-plus" ui-sref=".dictionary({group: '币别'})" ui-sref-opts="{location:false}" title="新增币别"></a>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">汇率</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="rate" ng-model="data.rate" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">其他事项</label>
            <div class="col-sm-8">
              <textarea class="form-control" rows="3" name="description" ng-model="data.description" data-rule="length[~100];"></textarea>
            </div>
          </div>
        </div>
        <!-- 注册进度 -->
        <div class="tab-pane" ng-class="{'active': activeTab == 1}" style="padding-bottom: 50px;">
          <div class="form-group">
            <label class="col-sm-2 control-label">客户归属<span class="required">*</span></label>
            <div class="col-sm-8">
              <input type="text" class="form-control" ng-model="data.salesman" disabled>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">订单归属</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" ng-model="data.creator" disabled>
            </div>
          </div>
          <div class="form-group">
              <label class="col-sm-2 control-label">渠道商</label>
              <div class="col-sm-8">
                <select
                  ui-select2
                  class="form-control select2"
                  id="traderSelect2"
                  name="trader_id"
                  ng-view="trader_name"
                  ng-model="data.trader_id"
                  data-formatfields="code,text"
                  data-formatcaptions="编号,名称"
                  url="Customer/SearchForDropdown"
                  paging="true"
                  style="width: 100%;"
                  readonly
                ></select>
                <span id="traderSelect2-validator" class="select-validator"></span>
              </div>
            </div>
  
          <div class="form-group">
            <label class="col-sm-2 control-label">助理</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="assistantSelect2" name="assistant_id" allowclear="true" ng-view="assistant_name" ng-model="data.assistant_id" url=" Member/List" paging="true" style="width: 100%;"></select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">年检客服<span class="required">*</span></label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="waiterSelect2" name="waiter_id" ng-view="waiter_name" ng-model="data.waiter_id" data-rule="required;" url=" Member/List" paging="true" style="width: 100%;"></select>
              <span id="waiterSelect2-validator" class="select-validator"></span>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">经理</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="waiterSelect2" name="manager_id" allowclear="true" ng-view="manager_name" ng-model="data.manager_id" url=" Member/List" paging="true" style="width: 100%;"></select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">注册提成所有人</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="cut_ownerSelect2" allowclear="true" name="cut_owner" ng-view="cut_owner_name" ng-model="data.cut_owner" url="Member/List" paging="true" style="width: 100%;"></select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">年检提成所有人</label>
            <div class="col-sm-8">
              <select ui-select2 class="form-control select2" id="annual_ownerSelect2" allowclear="true" name="annual_owner" ng-view="annual_owner_name" ng-model="data.annual_owner" url="Member/List" paging="true" style="width: 100%;"></select>
            </div>
          </div>
        </div>
        
        <div class="tab-pane" ng-class="{'active': activeTab == 0}" ng-if="data.is_old == 1 || data.is_annual == 1" style="padding-bottom: 50px;">
          <div class="form-group">
            <label class="col-sm-2 control-label">回执时间</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_receipt" name="date_receipt" ng-model="data.date_receipt">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">受理时间</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_accept" name="date_accept" ng-model="data.date_accept">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">初审时间</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_trial" name="date_trial" ng-model="data.date_trial">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">注册时间</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_regit" name="date_regit" ng-model="data.date_regit">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">续展时间</label>
            <div class="col-sm-8">
              <input type="text" class="form-control date-input" id="date_exten" name="date_exten" ng-model="data.date_exten">
            </div>
          </div>
        </div>
      </div>
    </div>
  </form>
</section>
<div ui-view="modal"></div>
